import request from '@/utils/request'
import { DeepRequired } from '../../interface'

/**
 * 使用自定义路径上传，请使用默认路径上传
 * /file/upload/template
 */
export function postFileUploadTemplate(params: PostFileUploadTemplateParams) {
  const paramsInput = {
    file: params.file,
  }
  return request.post<DeepRequired<string>>(`/file/upload/template`, null, {
    params: paramsInput,
  })
}

interface PostFileUploadTemplateParams {
  file: File
}
